import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      component: () => import('@/views/login/myLogin.vue'),
    },
    {
      path:'/',
      component:()=>import('@/views/MyLayout.vue'),
      redirect:'/home',
      children:[
        {
          path:'/home',
          component:()=>import('@/views/home/myHome.vue'),
          meta:{title:'数据概览'}
        },
        {
          path:'/article',
          component:()=>import('@/views/article/myArticle.vue'),
          meta:{title:'内容管理'}
        },
        {
          path:'/publish',
          component:()=>import('@/views/publish/myPublish.vue'),
          meta:{title:'发布文章'}
        }
      ]
    },
  ],
})

export default router
